package com.aaa.hospital.ManagementEnd.mapper;

import com.aaa.hospital.ManagementEnd.pojo.Examine;
import com.aaa.hospital.ManagementEnd.pojo.Prescription;
import com.aaa.hospital.ManagementEnd.util.PrescriptionDB;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface prescriptionDao {

     List<Prescription>  queryAll();
     boolean  ypinsert(Prescription pertion); //药单添加
    Prescription  queryById(@Param("ypid") Integer ypid,@Param("diaid") Integer diaid); //判定是否有该药品
    boolean addNum(@Param("ypid") Integer ypid,@Param("num") Integer num); // 数量加
    boolean minusNum( @Param("diaid") Integer diaid,@Param("ypid") Integer ypid,@Param("num") Integer num);  //数量减
    List<Prescription>  selectAll(Integer diaid);//通过识别码查询开了什么药
    boolean delByDiaid(Integer diaid);//清空表单
    boolean  delById(@Param("ypid") Integer ypid,@Param("diaid") Integer diaid); //判定药品为零时，删除该条数据


//11/8
    //患者藥品展示
List<PrescriptionDB>  preList(@Param("diaid") Integer diaid,@Param("time") Date time);


    //lgq'
    //11/8
    //患者体检信息展示、
    Examine EXById(Integer id);





}
